-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate latest thumbnail image for each segment #37
Conversation
Codecov Report
@@ Coverage Diff @@
## main #37 +/- ##
===============================================
+ Coverage 0 17.48252% +17.48252%
===============================================
Files 0 2 +2
Lines 0 143 +143
===============================================
+ Hits 0 25 +25
- Misses 0 109 +109
- Partials 0 9 +9
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
core/uploader.go
Outdated
defer f.Close() | ||
_, err = session.SaveData(context.Background(), "../latest.jpg", f, &drivers.FileProperties{CacheControl: "max-age=5"}, 1*time.Minute) | ||
if err != nil { | ||
log.Printf("Saving thumbnail failed: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get some context on these log lines so we can correlate to a particular upload URL
core/uploader.go
Outdated
func extractThumb(uri string, session drivers.OSSession) { | ||
presigned, err := session.Presign("", 5*time.Minute) | ||
if err != nil { | ||
log.Printf("Presigning failed for %s: %s", uri, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could have this method return an error and then just log that (and add the URI context at that top level)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that would make a lot more sense :)
This reverts commit 2bc1688.
No description provided.